import service from ".";

const http = {
  get: (url, params) => service.get(url, { params }),
  post: (url, data) => service.post(url, data),
  put: (url, data) => service.put(url, data),
  delete: (url, data) => service.delete(url, data),
  upload: (url, file) => service.post(url, file, {
    headers: { "Content-Type": "multipart/form-data" }
  })
}

export default http